<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->


<!DOCTYPE html
  PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="zh-cn" xml:lang="zh-cn">
<head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
   
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="DC.Type" content="topic">
<meta name="DC.Title" content="恢复Dameng">
<meta name="product" content="">
<meta name="DC.Relation" scheme="URI" content="dameng-00042.html">
<meta name="prodname" content="">
<meta name="version" content="">
<meta name="brand" content="30-OceanProtect 备份一体机 1.5.0-1.6.0 帮助中心">
<meta name="DC.Publisher" content="20240320">
<meta name="prodname" content="csbs">
<meta name="documenttype" content="usermanual">
<meta name="DC.Format" content="XHTML">
<meta name="DC.Identifier" content="dameng-00045">
<meta name="DC.Language" content="zh-cn">
<link rel="stylesheet" type="text/css" href="public_sys-resources/commonltr.css">
<title>恢复Dameng</title>
</head>
<body style="clear:both; padding-left:10px; padding-top:5px; padding-right:5px; padding-bottom:5px"><a name="dameng-00045"></a><a name="dameng-00045"></a>

<h1 class="topictitle1">恢复Dameng</h1>
<div><p>当需要对已备份的Dameng备份集进行恢复时，可以参考本节恢复Dameng备份集至原位置或新位置。</p>
<div class="section"><h4 class="sectiontitle">背景信息</h4><div class="p">支持使用备份副本、复制副本、归档副本进行恢复。支持恢复至原位置或新位置。<div class="note"><img src="public_sys-resources/note_3.0-zh-cn.png"><span class="notetitle"> </span><div class="notebody"><p>复制副本不支持恢复至原位置，复制副本的归档副本不支持恢复至原位置。</p>
</div></div>
</div>
</div>
<div class="section" id="dameng-00045__section13258102544115"><h4 class="sectiontitle">前提条件</h4><ul id="dameng-00045__ul155946913719"><li id="dameng-00045__li178221624154012">恢复前请确保恢复目标位置的数据目录剩余空间大于恢复副本缩减前大小，否则恢复将失败。</li></ul>
<ul id="dameng-00045__ul1648381342319"><li id="dameng-00045__li69561792311">执行新位置恢复前，请确保数据库安装用户具有恢复目标路径的读写权限。</li><li id="dameng-00045__li97319774218">当恢复的资源为MPP主备集群时，关闭数据库前，请确保主备数据库信息正确，否则需要对恢复目标资源执行资源扫描操作。</li></ul>
</div>
<div class="section"><h4 class="sectiontitle">操作步骤</h4><ol><li><span>选择<span class="uicontrol" id="dameng-00045__zh-cn_topic_0000001839142377_uicontrol11808134865610">“<span id="dameng-00045__zh-cn_topic_0000001839142377_text1680804813566">数据利用</span> &gt; <span id="dameng-00045__zh-cn_topic_0000001839142377_text18808144820567">副本数据</span> &gt; <span id="dameng-00045__zh-cn_topic_0000001839142377_text19349625124914">数据库</span> &gt; <span id="dameng-00045__zh-cn_topic_0000001839142377_text166390482814">Dameng</span>”</span>。</span></li><li><span>您可以以Dameng备份集资源维度或以副本维度查找副本，本节以资源维度为例进行说明。</span><p><p>在<span class="uicontrol">“<span>资源</span>”</span>页签，根据资源名称查找到需要恢复的资源，并单击资源名称。</p>
</p></li><li><span>依次选择年、月、天找到副本。</span><p><p>当时间上显示<span><img src="zh-cn_image_0000002010701196.png"></span>，即表示该月、该天存在副本。</p>
</p></li><li><span>单击<span><img src="zh-cn_image_0000002046860077.png"></span>，进入副本数据页面。</span></li><li><span>指定副本或指定时间点进行恢复。</span><p><ul><li>指定副本恢复<p>在需要恢复的副本所在行单击<span class="menucascade">“<span class="uicontrol"><span>更多</span></span> &gt; <span class="uicontrol"><span>恢复</span></span>”</span>。</p>
<div class="note"><img src="public_sys-resources/note_3.0-zh-cn.png"><span class="notetitle"> </span><div class="notebody"><p>当Dameng数据库的<span class="parmname">“类型”</span>为<span class="parmvalue">“单机”</span>时，需要先在副本数据页面单击<span><img src="zh-cn_image_0000002085038869.png"></span>切换到列表模式。</p>
</div></div>
</li><li>指定时间点恢复<p>在副本数据页面单击<span><img src="zh-cn_image_0000001988782784.png"></span>，在时间轴上选择蓝色覆盖区域的副本，单击<span class="menucascade">“<span class="uicontrol"><span>更多</span></span> &gt; <span class="uicontrol"><span>恢复</span></span>”</span>。</p>
<div class="note"><img src="public_sys-resources/note_3.0-zh-cn.png"><span class="notetitle"> </span><div class="notebody"><p>当Dameng数据库的<span class="parmname">“类型”</span>为<span class="parmvalue">“单机”</span>时，才支持该操作。</p>
</div></div>
</li></ul>
<div class="p">相关参数说明如<a href="#dameng-00045__table194961441141219">表1</a>。
<div class="tablenoborder"><a name="dameng-00045__table194961441141219"></a><a name="table194961441141219"></a><table cellpadding="4" cellspacing="0" summary="" id="dameng-00045__table194961441141219" frame="border" border="1" rules="all"><caption><b>表1 </b>恢复Dameng数据库参数说明</caption><colgroup><col style="width:21.44%"><col style="width:15.690000000000001%"><col style="width:62.870000000000005%"></colgroup><thead align="left"><tr><th align="left" class="cellrowborder" valign="top" width="21.44%" id="mcps1.3.4.2.5.2.2.2.2.4.1.1"><p>类型</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="15.690000000000001%" id="mcps1.3.4.2.5.2.2.2.2.4.1.2"><p>参数</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="62.870000000000005%" id="mcps1.3.4.2.5.2.2.2.2.4.1.3"><p>说明</p>
</th>
</tr>
</thead>
<tbody><tr><td class="cellrowborder" rowspan="7" valign="top" width="21.44%" headers="mcps1.3.4.2.5.2.2.2.2.4.1.1 "><p><span>Dameng单机</span></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
</td>
<td class="cellrowborder" valign="top" width="15.690000000000001%" headers="mcps1.3.4.2.5.2.2.2.2.4.1.2 "><p><span>恢复至</span></p>
</td>
<td class="cellrowborder" valign="top" width="62.870000000000005%" headers="mcps1.3.4.2.5.2.2.2.2.4.1.3 "><p>选择恢复至<span class="uicontrol">“<span>原位置</span>”</span>或<span class="uicontrol">“<span>新位置</span>”</span>。</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" headers="mcps1.3.4.2.5.2.2.2.2.4.1.1 "><p><span>位置</span></p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.3.4.2.5.2.2.2.2.4.1.2 "><p>当选择恢复至<span class="uicontrol">“<span>原位置</span>”</span>时，默认显示恢复的位置。</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" headers="mcps1.3.4.2.5.2.2.2.2.4.1.1 "><p>标签</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.3.4.2.5.2.2.2.2.4.1.2 "><p>当选择恢复至<span class="uicontrol">“<span>新位置</span>”</span>时，请选择标签。</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" headers="mcps1.3.4.2.5.2.2.2.2.4.1.1 "><p><span>目标主机</span></p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.3.4.2.5.2.2.2.2.4.1.2 "><p>当选择恢复至<span class="uicontrol">“<span>新位置</span>”</span>时，请选择恢复到的目标主机。</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" headers="mcps1.3.4.2.5.2.2.2.2.4.1.1 "><p><span>目标路径</span></p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.3.4.2.5.2.2.2.2.4.1.2 "><p>当选择恢复至<span class="uicontrol">“<span>新位置</span>”</span>时，请填写恢复到的目标路径，目标数据库的安装用户需要有该路径的写权限。</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" headers="mcps1.3.4.2.5.2.2.2.2.4.1.1 "><p><span>数据库名称</span></p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.3.4.2.5.2.2.2.2.4.1.2 "><p>当恢复位置为“<span>新位置</span>”恢复时，必须对恢复完成后的数据库进行命名。</p>
<div class="note"><span class="notetitle"> 说明： </span><div class="notebody"><ul><li>如果该数据库与恢复目标路径下的数据库名称相同，系统将覆盖同名数据库的数据。</li><li>如果该数据库与恢复目标主机下其他路径的数据库名称相同，恢复将失败。</li><li>如果该名称不存在，系统将在目标位置下生成新的数据库。</li></ul>
</div></div>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" headers="mcps1.3.4.2.5.2.2.2.2.4.1.1 "><p><span>数据库端口</span></p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.3.4.2.5.2.2.2.2.4.1.2 "><p></p>
<div class="p">当恢复位置为<span class="uicontrol">“<span>新位置</span>”</span>时，支持配置该参数。<ul><li>如果配置了该参数，且恢复目标路径存在数据库，恢复时系统将覆盖原数据库的端口。</li><li>如果未配置该参数，恢复目标路径不存在数据库，新恢复的数据库端口默认为<strong>5236</strong>。</li></ul>
</div>
</td>
</tr>
<tr><td class="cellrowborder" rowspan="3" valign="top" width="21.44%" headers="mcps1.3.4.2.5.2.2.2.2.4.1.1 "><p>MPP主备集群</p>
<div class="note"><span class="notetitle"> 说明： </span><div class="notebody"><p>1.5.0版本为“MPP集群”。</p>
</div></div>
<p></p>
</td>
<td class="cellrowborder" valign="top" width="15.690000000000001%" headers="mcps1.3.4.2.5.2.2.2.2.4.1.2 "><p><span>恢复至</span></p>
</td>
<td class="cellrowborder" valign="top" width="62.870000000000005%" headers="mcps1.3.4.2.5.2.2.2.2.4.1.3 "><p>选择恢复至<span class="uicontrol">“<span>原位置</span>”</span>或<span class="uicontrol">“<span>新位置</span>”</span>。</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" headers="mcps1.3.4.2.5.2.2.2.2.4.1.1 "><p><span>位置</span></p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.3.4.2.5.2.2.2.2.4.1.2 "><p>当选择恢复至<span class="uicontrol">“<span>原位置</span>”</span>时，默认显示恢复的位置。</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" headers="mcps1.3.4.2.5.2.2.2.2.4.1.1 "><p><span>目标集群</span></p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.3.4.2.5.2.2.2.2.4.1.2 "><p>当选择恢复至<span class="uicontrol">“<span>新位置</span>”</span>时，请选择恢复到的目标集群。</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</p></li><li><span>单击<span class="uicontrol">“确定”</span>。</span></li><li><span>使用PuTTY，登录集群所在主机。</span></li><li><span>在监视器中恢复MPP主备集群控制文件到一致状态。</span><p><ol type="a"><li>执行以下命令，查询监视器配置文件所在路径。<pre class="screen">find / -name dmmonitor.ini</pre>
<p>回显类似如下：</p>
<pre class="screen">[root@dm8_monitor_16183 <font style="font-size:8pt" Face="Courier New" >~</font>]# find / -name dmmonitor.ini
/dm8/data/dmmonitor.ini</pre>
</li><li>执行以下命令，登录监视器。<pre class="screen">su - dmdba -c "dmmonitor <em>监视器配置文件所在路径</em>"</pre>
<div class="p">如：<pre class="screen">su - dmdba -c "dmmonitor /dm8/data/dmmonitor.ini"</pre>
</div>
</li><li>执行以下命令，恢复MPP主备集群控制文件到一致状态。<pre class="screen">recover mppctl</pre>
</li></ol>
<div class="note"><img src="public_sys-resources/note_3.0-zh-cn.png"><span class="notetitle"> </span><div class="notebody"><ul><li>恢复结束后，若集群中存在<span class="uicontrol">“<span>离线</span>”</span>状态的节点，请在监视器中执行<strong>help</strong>命令，查询重启集群命令并重启集群服务。</li><li>当恢复的资源为MPP主备集群时，恢复任务完成后，请对恢复目标资源执行资源扫描操作，以确保获取的主备数据库信息正确。</li></ul>
</div></div>
</p></li></ol>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>父主题：</strong> <a href="dameng-00042.html">恢复</a></div>
</div>
</div>

<div class="hrcopyright"><hr size="2"></div><div class="hwcopyright">版权所有 &copy; 华为技术有限公司</div></body>
</html>